﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="PharmacyWeb._Default" %>

<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">      
    
</asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <h1>FARMACIA</h1>
    <h2>SANTISIMA VIGEN DE LA ASUNCIÓN</h2>
    <asp:Label runat="server" ID="lblAction"></asp:Label>
    <%--codigo para modal--%>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js" type="text/javascript"></script>
        <link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/start/jquery-ui.css"
            rel="stylesheet" type="text/css" />
    <script src="Scripts/PaginasJS.js"></script>
        <script type="text/javascript">
            //$("[id*=btnPopup]").live("click", function () {       
            $(document).ready(function () {

                $.ajax({
                    type: "POST",
                    url: "/ChangeProduct.asmx/CountProduct",
                    contentType: "application/json",
                    dataType: "json"
                    
                }).done(function(data) {
                    var exist = $.parseJSON(data.d);
                    if (exist.Response == "False") {
                        return false;
                    } else {
                        $("#dialog").dialog({
                                    title: "Mensaje Importante!!",
                                    buttons: {
                                        Close: function () {
                                            $(this).dialog('close');
                                        }
                                    }
                                }); 
                    }
                    return false;
                });
            });

                

                //var haveproductochange = true;

                //if (haveproductochange) {
                //    

                //}
                //            //return false;
               
        </script>
        <div id="dialog" style="display: none">
            Tiene productos para
            <b>Canje</b><br/>
            <b><a href="Almacen/frmListProductosCanje.aspx" style="color: blue;" title="Ver Detalles">Ver Datalles</a></b>
        </div>
        <%--<asp:Button ID="btnPopup" CssClass="btn btn-success" runat="server" Text="Show Popup" />--%>
        <%--fin codigo modal--%>
    
    <div  class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>
    <a id="btn" class="btn"> Aqui</a>
</asp:Content>
